#include "editgroupinfodialog.h"
#include "clientgroup.h"

EditGroupInfoDialog::EditGroupInfoDialog(boost::shared_ptr<ClientGroup>clientGroup, QWidget *parent) :
	QDialog(parent), m_ClientGroup(clientGroup)
{
	setupUi(this);
	m_IdEdit->setText(QString::number(clientGroup->getId()));
	m_NameEdit->setText(clientGroup->getName());
	connect(buttonBox, SIGNAL(accepted()),this, SLOT(onOk()));
}

void EditGroupInfoDialog::onOk()
{
	QString name = m_NameEdit->text();
	m_ClientGroup->setName(name);
}
